﻿using System.Runtime.Serialization;
using Newtonsoft.Json;

namespace Spikes.ActivityStreams
{
    /// <summary>
    /// Within this specification, an object is a thing, real or imaginary, which participates in an activity. It may be the entity performing the activity, or the entity on which the activity was performed.
    /// </summary>
    [JsonObject()]
    [DataContract]
    public partial class Object
    {
        /// <summary>
        /// A collection of one or more additional, associated objects, similar to the concept of attached files in an email message.
        /// </summary>
        [JsonProperty(PropertyName = "attachments")]
        [DataMember(Name = "attachments")]
        public Object[] Attachments;

        /// <summary>
        /// Describes the entity that created or authored the object.
        /// </summary>
        [JsonProperty(PropertyName = "author")]
        [DataMember(Name = "author")]
        public Object Author;

        /// <summary>
        /// Natural-language description of the object encoded as a single JSON String (containing HTML markup).
        /// </summary>
        [JsonProperty(PropertyName = "content")]
        [DataMember(Name = "content")]
        public string Content;

        /// <summary>
        /// A natural-language, human-readable and plain-text name for the object.
        /// </summary>
        [JsonProperty(PropertyName = "displayName")]
        [DataMember(Name = "displayName")]
        public string DisplayName;

        /// <summary>
        /// A JSON Array of one or more absolute IRI's identifying objects that duplicate this object's content.
        /// </summary>
        [JsonProperty(PropertyName = "downstreamDuplicates")]
        [DataMember(Name = "downstreamDuplicates")]
        public string[] DownstreamDuplicates;

        /// <summary>
        /// Provides a permanent, universally unique identifier for the object in the form of a string
        /// </summary>
        [JsonProperty(PropertyName = "id")]
        [DataMember(Name = "id")]
        public string ID;

        /// <summary>
        /// Description of a resource providing a visual representation of the object, intended for human consumption.
        /// </summary>
        [JsonProperty(PropertyName = "image")]
        [DataMember(Name = "image")]
        public MediaLink Image;

        /// <summary>
        /// Identifies the type of object.
        /// </summary>
        [JsonProperty(PropertyName = "objectType")]
        [DataMember(Name = "objectType")]
        public string ObjectType;

        /// <summary>
        /// The date and time (in the Coordinated Universal Time (UTC) format) at which the object was published.
        /// </summary>
        [JsonProperty(PropertyName = "published")]
        [DataMember(Name = "published")]
        public string Published;

        /// <summary>
        /// Natural-language summarization of the object encoded as a single JSON String (containing HTML markup).
        /// </summary>
        [JsonProperty(PropertyName = "summary")]
        [DataMember(Name = "summary")]
        public string Summary;

        /// <summary>
        /// The date and time (in the Coordinated Universal Time (UTC) format) at which a previously published object has been modified.
        /// </summary>
        [JsonProperty(PropertyName = "updated")]
        [DataMember(Name = "updated")]
        public string Updated;

        /// <summary>
        /// A JSON Array of one or more absolute IRI's identifying objects that duplicate this object's content.
        /// </summary>
        [JsonProperty(PropertyName = "upstreamDuplicates")]
        [DataMember(Name = "upstreamDuplicates")]
        public string[] UpstreamDuplicates;

        /// <summary>
        /// An IRI identifying a resource providing an HTML representation of the object.
        /// </summary>
        [JsonProperty(PropertyName = "url")]
        [DataMember(Name = "url")]
        public string Url;
    }
}
